package com.wlyuan.index.api;

import com.alibaba.fastjson.JSONObject;
import com.wlyuan.index.api.dto.order.OrderIndexDTO;
import com.wlyuan.index.api.dto.order.OrderIndexFilterDTO;
import com.wlyuan.index.api.dto.order.OrderReindexAllDTO;
import com.wlyuan.index.api.dto.order.OrderReindexDTO;
import com.wlyuan.index.api.vo.OrderIndexScrollVO;
import com.wlyuan.index.api.vo.OrderIndexSumVO;
import com.wlyuan.index.api.vo.OrderIndexVO;
import com.wlyuan.tools.Page;

import java.util.List;
import java.util.Map;

/**
 * @author yuanjie
 */
public interface IOrderIndexService {
    void index(Long orderId);

    void index(List<Long> orderIds);

    void index(OrderIndexDTO order);

    Page<OrderIndexVO> search(OrderIndexFilterDTO filter);

    OrderIndexScrollVO scroll(OrderIndexFilterDTO filter);

    OrderIndexScrollVO scroll(String scrollId);

    OrderIndexSumVO searchSum(OrderIndexFilterDTO filter);

    Map<Long, OrderIndexSumVO> searchSums(OrderIndexFilterDTO filter);

    void reindex(Long orderId);

    void reindex(OrderReindexDTO reindex);

    void reindexAll(OrderReindexAllDTO reindex);

    void remove(Long orderId);

    OrderIndexVO getIndexById(Long orderId);

    JSONObject insight(Long orderId);
}
